package DAO;

import javax.persistence.EntityManager;

import Entity.Stock;

public class StockDAO {

	private StockDAO() {
	}

	// Stoke
	public static void create(Stock nuevo, EntityManager em) {
		em.persist(nuevo);
	}

	public static Stock read(Stock par, EntityManager em) {
		return em.find(par.getClass(), par.getId());
	}

	public static void update(Stock old, EntityManager em) {
		em.merge(old);
	}

	public static void delete(Stock market, EntityManager em) {
		em.remove(market);
	}

}
